import os
import settings


__process = lambda path: os.mkdir(path) if not os.path.exists(path) else True
______create = lambda filepath: open(filepath, 'w') if not os.path.exists(filepath) else True


def init():
    __process(settings.log_path)
    __process(settings.links_log_path)
    __process(settings.archive_path)
    __process(settings.app_log_path)

    ______create(settings.archive_filename)

    __process(settings.downloader_logging_file_path)
    __process(settings.downloader_logging_file_completed_path)
    __process(settings.downloader_logging_file_failed_path)
    __process(settings.downloader_logging_file_todo_path)

    __process(settings.download_save_path)
    __process(settings.downloader_log_path)


if __name__ == '__main__':
    init()
